package com.kc.data.common.domain.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 商品类别
 */
@Data
@TableName(value = "kc_goods_category")
public class BizGoodsCategory {
    /*分类id*/
    @TableId
    private Integer id;
    /*分类名称*/
    @NotNull(message = "分类名称不能为空")
    private String name;
    /*图片*/
    private String thumb;
    /*父级ID*/
    private Integer pid;
    /*等级*/
    private Integer level;
    /*分类描述*/
    private String description;
    /*排序*/
    private Integer sort;
    /*状态*/
    private Integer status;
    /*删除标识：1已删除，0未删除*/
    private Integer isDeleted;
    /*APP主类别*/
    @NotNull(message = "APP主类别不能为空")
    private Integer appCate;
    /** 子类别 */
    @TableField(exist = false)
    private List<BizGoodsCategory> children = new ArrayList<BizGoodsCategory>();
}
